package st.business.tepth.business.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangyu
 * @date 2019/9/3
 */
public class ReturnFactoryBean {
    private int repairType;
    private int id;
    private List<Classification> unSolveTaskList;

    public int getRepairType() {
        return repairType;
    }

    public void setRepairType(int repairType) {
        this.repairType = repairType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<Classification> getUnSolveTaskList() {
        return unSolveTaskList;
    }

    public void setUnSolveTaskList(List<Classification> unSolveTaskList) {
        this.unSolveTaskList = unSolveTaskList;
    }

    public static class Classification implements Parcelable {

        private List<CommonBean> repairPhenomenonList;
        private String seriesName;
        private int id;
        private List<ClassCategory> categoryList;

        public List<CommonBean> getRepairPhenomenonList() {
            return repairPhenomenonList;
        }

        public void setRepairPhenomenonList(List<CommonBean> repairPhenomenonList) {
            this.repairPhenomenonList = repairPhenomenonList;
        }

        public String getSeriesName() {
            return seriesName;
        }

        public void setSeriesName(String seriesName) {
            this.seriesName = seriesName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public List<ClassCategory> getCategoryList() {
            return categoryList;
        }

        public void setCategoryList(List<ClassCategory> categoryList) {
            this.categoryList = categoryList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeTypedList(this.repairPhenomenonList);
            dest.writeString(this.seriesName);
            dest.writeInt(this.id);
            dest.writeList(this.categoryList);
        }

        public Classification() {
        }

        protected Classification(Parcel in) {
            this.repairPhenomenonList = in.createTypedArrayList(CommonBean.CREATOR);
            this.seriesName = in.readString();
            this.id = in.readInt();
            this.categoryList = new ArrayList<ClassCategory>();
            in.readList(this.categoryList, ClassCategory.class.getClassLoader());
        }

        public static final Parcelable.Creator<Classification> CREATOR = new Parcelable.Creator<Classification>() {
            @Override
            public Classification createFromParcel(Parcel source) {
                return new Classification(source);
            }

            @Override
            public Classification[] newArray(int size) {
                return new Classification[size];
            }
        };
    }

    public static class ClassCategory implements Parcelable {

        private String category;
        private List<CommonBean> maintenanceList;

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public List<CommonBean> getMaintenanceList() {
            return maintenanceList;
        }

        public void setMaintenanceList(List<CommonBean> maintenanceList) {
            this.maintenanceList = maintenanceList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.category);
            dest.writeTypedList(this.maintenanceList);
        }

        public ClassCategory() {
        }

        protected ClassCategory(Parcel in) {
            this.category = in.readString();
            this.maintenanceList = in.createTypedArrayList(CommonBean.CREATOR);
        }

        public static final Parcelable.Creator<ClassCategory> CREATOR = new Parcelable.Creator<ClassCategory>() {
            @Override
            public ClassCategory createFromParcel(Parcel source) {
                return new ClassCategory(source);
            }

            @Override
            public ClassCategory[] newArray(int size) {
                return new ClassCategory[size];
            }
        };
    }
}
